/*
 ------------------------------------------------------------------------------
 Copyright (C) 2006-2007 Team Blur.

 This file is part of the Quantum Engine source code.

 The Quantum Engine source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The Quantum Engine source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the Quantum Engine source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


#ifndef __QGL_H__
#define __QGL_H__


#ifdef _WIN32

#include <windows.h>
#include <GL/gl.h>

#else

#error "QGL not available for this platform"

#endif


#include "../include/GL/glext.h"
#include "../include/GL/wglext.h"


// ============================================================================

#ifdef _WIN32

#ifndef WINAPI
#define WINAPI
#endif

typedef int				(WINAPI * WGLCHOOSEPIXELFORMAT)(HDC, CONST PIXELFORMATDESCRIPTOR *);
typedef BOOL			(WINAPI * WGLCOPYCONTEXT)(HGLRC, HGLRC, UINT);
typedef HGLRC			(WINAPI * WGLCREATECONTEXT)(HDC);
typedef HGLRC			(WINAPI * WGLCREATELAYERCONTEXT)(HDC, int);
typedef BOOL			(WINAPI * WGLDELETECONTEXT)(HGLRC);
typedef BOOL			(WINAPI * WGLDESCRIBELAYERPLANE)(HDC, int, int, UINT, LPLAYERPLANEDESCRIPTOR);
typedef int				(WINAPI * WGLDESCRIBEPIXELFORMAT)(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
typedef HGLRC			(WINAPI * WGLGETCURRENTCONTEXT)(void);
typedef HDC				(WINAPI * WGLGETCURRENTDC)(void);
typedef int				(WINAPI * WGLGETLAYERPALETTEENTRIES)(HDC, int, int, int, COLORREF *);
typedef int				(WINAPI * WGLGETPIXELFORMAT)(HDC);
typedef PROC			(WINAPI * WGLGETPROCADDRESS)(LPCSTR);
typedef BOOL			(WINAPI * WGLMAKECURRENT)(HDC, HGLRC);
typedef BOOL			(WINAPI * WGLREALIZELAYERPALETTE)(HDC, int, BOOL);
typedef int				(WINAPI * WGLSETLAYERPALETTEENTRIES)(HDC, int, int, int, CONST COLORREF *);
typedef BOOL			(WINAPI * WGLSETPIXELFORMAT)(HDC, int, CONST PIXELFORMATDESCRIPTOR *);
typedef BOOL			(WINAPI * WGLSHARELISTS)(HGLRC, HGLRC);
typedef BOOL			(WINAPI * WGLSWAPBUFFERS)(HDC);
typedef BOOL			(WINAPI * WGLSWAPLAYERBUFFERS)(HDC, UINT);
typedef BOOL			(WINAPI * WGLUSEFONTBITMAPS)(HDC, DWORD, DWORD, DWORD);
typedef BOOL			(WINAPI * WGLUSEFONTOUTLINES)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int, LPGLYPHMETRICSFLOAT);

typedef BOOL			(WINAPI * WGLSWAPINTERVALEXT)(int);

// ============================================================================

extern int				(WINAPI * qwglChoosePixelFormat)(HDC hDC, CONST PIXELFORMATDESCRIPTOR *pPFD);
extern BOOL				(WINAPI * qwglCopyContext)(HGLRC hGLRCSrc, HGLRC hGLRCDst, UINT mask);
extern HGLRC			(WINAPI * qwglCreateContext)(HDC hDC);
extern HGLRC			(WINAPI * qwglCreateLayerContext)(HDC hDC, int iLayerPlane);
extern BOOL				(WINAPI * qwglDeleteContext)(HGLRC hGLRC);
extern BOOL				(WINAPI * qwglDescribeLayerPlane)(HDC hDC, int iPixelFormat, int iLayerPlane, UINT nBytes, LPLAYERPLANEDESCRIPTOR pLPD);
extern int				(WINAPI * qwglDescribePixelFormat)(HDC hDC, int iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR pPFD);
extern HGLRC			(WINAPI * qwglGetCurrentContext)(void);
extern HDC				(WINAPI * qwglGetCurrentDC)(void);
extern int				(WINAPI * qwglGetLayerPaletteEntries)(HDC hDC, int iLayerPlane, int iStart, int cEntries, COLORREF *pCR);
extern int				(WINAPI * qwglGetPixelFormat)(HDC hDC);
extern PROC				(WINAPI * qwglGetProcAddress)(LPCSTR lpszProc);
extern BOOL				(WINAPI * qwglMakeCurrent)(HDC hDC, HGLRC hGLRC);
extern BOOL				(WINAPI * qwglRealizeLayerPalette)(HDC hDC, int iLayerPlane, BOOL bRealize);
extern int				(WINAPI * qwglSetLayerPaletteEntries)(HDC hDC, int iLayerPlane, int iStart, int cEntries, CONST COLORREF *pCR);
extern BOOL				(WINAPI * qwglSetPixelFormat)(HDC hDC, int iPixelFormat, CONST PIXELFORMATDESCRIPTOR *pPFD);
extern BOOL				(WINAPI * qwglShareLists)(HGLRC hGLRC1, HGLRC hGLRC2);
extern BOOL				(WINAPI * qwglSwapBuffers)(HDC hDC);
extern BOOL				(WINAPI * qwglSwapLayerBuffers)(HDC hDC, UINT fuPlanes);
extern BOOL				(WINAPI * qwglUseFontBitmaps)(HDC hDC, DWORD first, DWORD count, DWORD listBase);
extern BOOL				(WINAPI * qwglUseFontOutlines)(HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpGMF);

extern BOOL				(WINAPI * qwglSwapIntervalEXT)(int interval);

#endif

// ============================================================================

#ifndef APIENTRY
#define APIENTRY
#endif

typedef GLvoid			(APIENTRY * GLACCUM)(GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLALPHAFUNC)(GLenum, GLclampf);
typedef GLboolean		(APIENTRY * GLARETEXTURESRESIDENT)(GLsizei, const GLuint *, GLboolean *);
typedef GLvoid			(APIENTRY * GLARRAYELEMENT)(GLint);
typedef GLvoid			(APIENTRY * GLBEGIN)(GLenum);
typedef GLvoid			(APIENTRY * GLBINDTEXTURE)(GLenum, GLuint);
typedef GLvoid			(APIENTRY * GLBITMAP)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *);
typedef GLvoid			(APIENTRY * GLBLENDFUNC)(GLenum, GLenum);
typedef GLvoid			(APIENTRY * GLCALLLIST)(GLuint);
typedef GLvoid			(APIENTRY * GLCALLLISTS)(GLsizei, GLenum, const GLvoid *);
typedef GLvoid			(APIENTRY * GLCLEAR)(GLbitfield);
typedef GLvoid			(APIENTRY * GLCLEARACCUM)(GLfloat, GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLCLEARCOLOR)(GLclampf, GLclampf, GLclampf, GLclampf);
typedef GLvoid			(APIENTRY * GLCLEARDEPTH)(GLclampd);
typedef GLvoid			(APIENTRY * GLCLEARINDEX)(GLfloat);
typedef GLvoid			(APIENTRY * GLCLEARSTENCIL)(GLint);
typedef GLvoid			(APIENTRY * GLCLIPPLANE)(GLenum, const GLdouble *);
typedef GLvoid			(APIENTRY * GLCOLOR3B)(GLbyte, GLbyte, GLbyte);
typedef GLvoid			(APIENTRY * GLCOLOR3BV)(const GLbyte *);
typedef GLvoid			(APIENTRY * GLCOLOR3D)(GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLCOLOR3DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLCOLOR3F)(GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLCOLOR3FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLCOLOR3I)(GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLCOLOR3IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLCOLOR3S)(GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLCOLOR3SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLCOLOR3UB)(GLubyte, GLubyte, GLubyte);
typedef GLvoid			(APIENTRY * GLCOLOR3UBV)(const GLubyte *);
typedef GLvoid			(APIENTRY * GLCOLOR3UI)(GLuint, GLuint, GLuint);
typedef GLvoid			(APIENTRY * GLCOLOR3UIV)(const GLuint *);
typedef GLvoid			(APIENTRY * GLCOLOR3US)(GLushort, GLushort, GLushort);
typedef GLvoid			(APIENTRY * GLCOLOR3USV)(const GLushort *);
typedef GLvoid			(APIENTRY * GLCOLOR4B)(GLbyte, GLbyte, GLbyte, GLbyte);
typedef GLvoid			(APIENTRY * GLCOLOR4BV)(const GLbyte *);
typedef GLvoid			(APIENTRY * GLCOLOR4D)(GLdouble, GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLCOLOR4DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLCOLOR4F)(GLfloat, GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLCOLOR4FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLCOLOR4I)(GLint, GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLCOLOR4IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLCOLOR4S)(GLshort, GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLCOLOR4SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLCOLOR4UB)(GLubyte, GLubyte, GLubyte, GLubyte);
typedef GLvoid			(APIENTRY * GLCOLOR4UBV)(const GLubyte *);
typedef GLvoid			(APIENTRY * GLCOLOR4UI)(GLuint, GLuint, GLuint, GLuint);
typedef GLvoid			(APIENTRY * GLCOLOR4UIV)(const GLuint *);
typedef GLvoid			(APIENTRY * GLCOLOR4US)(GLushort, GLushort, GLushort, GLushort);
typedef GLvoid			(APIENTRY * GLCOLOR4USV)(const GLushort *);
typedef GLvoid			(APIENTRY * GLCOLORMASK)(GLboolean, GLboolean, GLboolean, GLboolean);
typedef GLvoid			(APIENTRY * GLCOLORMATERIAL)(GLenum, GLenum);
typedef GLvoid			(APIENTRY * GLCOLORPOINTER)(GLint, GLenum, GLsizei, const GLvoid *);
typedef GLvoid			(APIENTRY * GLCOPYPIXELS)(GLint, GLint, GLsizei, GLsizei, GLenum);
typedef GLvoid			(APIENTRY * GLCOPYTEXIMAGE1D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
typedef GLvoid			(APIENTRY * GLCOPYTEXIMAGE2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
typedef GLvoid			(APIENTRY * GLCOPYTEXSUBIMAGE1D)(GLenum, GLint, GLint, GLint, GLint, GLsizei);
typedef GLvoid			(APIENTRY * GLCOPYTEXSUBIMAGE2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
typedef GLvoid			(APIENTRY * GLCULLFACE)(GLenum);
typedef GLvoid			(APIENTRY * GLDELETELISTS)(GLuint, GLsizei);
typedef GLvoid			(APIENTRY * GLDELETETEXTURES)(GLsizei, const GLuint *);
typedef GLvoid			(APIENTRY * GLDEPTHFUNC)(GLenum);
typedef GLvoid			(APIENTRY * GLDEPTHMASK)(GLboolean);
typedef GLvoid			(APIENTRY * GLDEPTHRANGE)(GLclampd, GLclampd);
typedef GLvoid			(APIENTRY * GLDISABLE)(GLenum);
typedef GLvoid			(APIENTRY * GLDISABLECLIENTSTATE)(GLenum);
typedef GLvoid			(APIENTRY * GLDRAWARRAYS)(GLenum, GLint, GLsizei);
typedef GLvoid			(APIENTRY * GLDRAWBUFFER)(GLenum);
typedef GLvoid			(APIENTRY * GLDRAWELEMENTS)(GLenum, GLsizei, GLenum, const GLvoid *);
typedef GLvoid			(APIENTRY * GLDRAWPIXELS)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
typedef GLvoid			(APIENTRY * GLEDGEFLAG)(GLboolean);
typedef GLvoid			(APIENTRY * GLEDGEFLAGPOINTER)(GLsizei, const GLvoid *);
typedef GLvoid			(APIENTRY * GLEDGEFLAGV)(const GLboolean *);
typedef GLvoid			(APIENTRY * GLENABLE)(GLenum);
typedef GLvoid			(APIENTRY * GLENABLECLIENTSTATE)(GLenum);
typedef GLvoid			(APIENTRY * GLEND)(GLvoid);
typedef GLvoid			(APIENTRY * GLENDLIST)(GLvoid);
typedef GLvoid			(APIENTRY * GLEVALCOORD1D)(GLdouble);
typedef GLvoid			(APIENTRY * GLEVALCOORD1DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLEVALCOORD1F)(GLfloat);
typedef GLvoid			(APIENTRY * GLEVALCOORD1FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLEVALCOORD2D)(GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLEVALCOORD2DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLEVALCOORD2F)(GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLEVALCOORD2FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLEVALMESH1)(GLenum, GLint, GLint);
typedef GLvoid			(APIENTRY * GLEVALMESH2)(GLenum, GLint, GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLEVALPOINT1)(GLint);
typedef GLvoid			(APIENTRY * GLEVALPOINT2)(GLint, GLint);
typedef GLvoid			(APIENTRY * GLFEEDBACKBUFFER)(GLsizei, GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLFINISH)(GLvoid);
typedef GLvoid			(APIENTRY * GLFLUSH)(GLvoid);
typedef GLvoid			(APIENTRY * GLFOGF)(GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLFOGFV)(GLenum, const GLfloat *);
typedef GLvoid			(APIENTRY * GLFOGI)(GLenum, GLint);
typedef GLvoid			(APIENTRY * GLFOGIV)(GLenum, const GLint *);
typedef GLvoid			(APIENTRY * GLFRONTFACE)(GLenum);
typedef GLvoid			(APIENTRY * GLFRUSTUM)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
typedef GLuint			(APIENTRY * GLGENLISTS)(GLsizei);
typedef GLvoid			(APIENTRY * GLGENTEXTURES)(GLsizei, GLuint *);
typedef GLvoid			(APIENTRY * GLGETBOOLEANV)(GLenum, GLboolean *);
typedef GLvoid			(APIENTRY * GLGETCLIPPLANE)(GLenum, GLdouble *);
typedef GLvoid			(APIENTRY * GLGETDOUBLEV)(GLenum, GLdouble *);
typedef GLenum			(APIENTRY * GLGETERROR)(GLvoid);
typedef GLvoid			(APIENTRY * GLGETFLOATV)(GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLGETINTEGERV)(GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLGETLIGHTFV)(GLenum, GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLGETLIGHTIV)(GLenum, GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLGETMAPDV)(GLenum, GLenum, GLdouble *);
typedef GLvoid			(APIENTRY * GLGETMAPFV)(GLenum, GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLGETMAPIV)(GLenum, GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLGETMATERIALFV)(GLenum, GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLGETMATERIALIV)(GLenum, GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLGETPIXELMAPFV)(GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLGETPIXELMAPUIV)(GLenum, GLuint *);
typedef GLvoid			(APIENTRY * GLGETPIXELMAPUSV)(GLenum, GLushort *);
typedef GLvoid			(APIENTRY * GLGETPOINTERV)(GLenum, GLvoid **);
typedef GLvoid			(APIENTRY * GLGETPOLYGONSTIPPLE)(GLubyte *);
typedef const GLubyte *	(APIENTRY * GLGETSTRING)(GLenum);
typedef GLvoid			(APIENTRY * GLGETTEXENVFV)(GLenum, GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLGETTEXENVIV)(GLenum, GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLGETTEXGENDV)(GLenum, GLenum, GLdouble *);
typedef GLvoid			(APIENTRY * GLGETTEXGENFV)(GLenum, GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLGETTEXGENIV)(GLenum, GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLGETTEXIMAGE)(GLenum, GLint, GLenum, GLenum, GLvoid *);
typedef GLvoid			(APIENTRY * GLGETTEXLEVELPARAMETERFV)(GLenum, GLint, GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLGETTEXLEVELPARAMETERIV)(GLenum, GLint, GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLGETTEXPARAMETERFV)(GLenum, GLenum, GLfloat *);
typedef GLvoid			(APIENTRY * GLGETTEXPARAMETERIV)(GLenum, GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLHINT)(GLenum, GLenum);
typedef GLvoid			(APIENTRY * GLINDEXMASK)(GLuint);
typedef GLvoid			(APIENTRY * GLINDEXPOINTER)(GLenum, GLsizei, const GLvoid *);
typedef GLvoid			(APIENTRY * GLINDEXD)(GLdouble);
typedef GLvoid			(APIENTRY * GLINDEXDV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLINDEXF)(GLfloat);
typedef GLvoid			(APIENTRY * GLINDEXFV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLINDEXI)(GLint);
typedef GLvoid			(APIENTRY * GLINDEXIV)(const GLint *);
typedef GLvoid			(APIENTRY * GLINDEXS)(GLshort);
typedef GLvoid			(APIENTRY * GLINDEXSV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLINDEXUB)(GLubyte);
typedef GLvoid			(APIENTRY * GLINDEXUBV)(const GLubyte *);
typedef GLvoid			(APIENTRY * GLINITNAMES)(GLvoid);
typedef GLvoid			(APIENTRY * GLINTERLEAVEDARRAYS)(GLenum, GLsizei, const GLvoid *);
typedef GLboolean		(APIENTRY * GLISENABLED)(GLenum);
typedef GLboolean		(APIENTRY * GLISLIST)(GLuint);
typedef GLboolean		(APIENTRY * GLISTEXTURE)(GLuint);
typedef GLvoid			(APIENTRY * GLLIGHTMODELF)(GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLLIGHTMODELFV)(GLenum, const GLfloat *);
typedef GLvoid			(APIENTRY * GLLIGHTMODELI)(GLenum, GLint);
typedef GLvoid			(APIENTRY * GLLIGHTMODELIV)(GLenum, const GLint *);
typedef GLvoid			(APIENTRY * GLLIGHTF)(GLenum, GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLLIGHTFV)(GLenum, GLenum, const GLfloat *);
typedef GLvoid			(APIENTRY * GLLIGHTI)(GLenum, GLenum, GLint);
typedef GLvoid			(APIENTRY * GLLIGHTIV)(GLenum, GLenum, const GLint *);
typedef GLvoid			(APIENTRY * GLLINESTIPPLE)(GLint, GLushort);
typedef GLvoid			(APIENTRY * GLLINEWIDTH)(GLfloat);
typedef GLvoid			(APIENTRY * GLLISTBASE)(GLuint);
typedef GLvoid			(APIENTRY * GLLOADIDENTITY)(GLvoid);
typedef GLvoid			(APIENTRY * GLLOADMATRIXD)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLLOADMATRIXF)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLLOADNAME)(GLuint);
typedef GLvoid			(APIENTRY * GLLOGICOP)(GLenum);
typedef GLvoid			(APIENTRY * GLMAP1D)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
typedef GLvoid			(APIENTRY * GLMAP1F)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
typedef GLvoid			(APIENTRY * GLMAP2D)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
typedef GLvoid			(APIENTRY * GLMAP2F)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
typedef GLvoid			(APIENTRY * GLMAPGRID1D)(GLint, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLMAPGRID1F)(GLint, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLMAPGRID2D)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLMAPGRID2F)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLMATERIALF)(GLenum, GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLMATERIALFV)(GLenum, GLenum, const GLfloat *);
typedef GLvoid			(APIENTRY * GLMATERIALI)(GLenum, GLenum, GLint);
typedef GLvoid			(APIENTRY * GLMATERIALIV)(GLenum, GLenum, const GLint *);
typedef GLvoid			(APIENTRY * GLMATRIXMODE)(GLenum);
typedef GLvoid			(APIENTRY * GLMULTMATRIXD)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLMULTMATRIXF)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLNEWLIST)(GLuint, GLenum);
typedef GLvoid			(APIENTRY * GLNORMAL3B)(GLbyte, GLbyte, GLbyte);
typedef GLvoid			(APIENTRY * GLNORMAL3BV)(const GLbyte *);
typedef GLvoid			(APIENTRY * GLNORMAL3D)(GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLNORMAL3DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLNORMAL3F)(GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLNORMAL3FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLNORMAL3I)(GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLNORMAL3IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLNORMAL3S)(GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLNORMAL3SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLNORMALPOINTER)(GLenum, GLsizei, const GLvoid *);
typedef GLvoid			(APIENTRY * GLORTHO)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLPASSTHROUGH)(GLfloat);
typedef GLvoid			(APIENTRY * GLPIXELMAPFV)(GLenum, GLsizei, const GLfloat *);
typedef GLvoid			(APIENTRY * GLPIXELMAPUIV)(GLenum, GLsizei, const GLuint *);
typedef GLvoid			(APIENTRY * GLPIXELMAPUSV)(GLenum, GLsizei, const GLushort *);
typedef GLvoid			(APIENTRY * GLPIXELSTOREF)(GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLPIXELSTOREI)(GLenum, GLint);
typedef GLvoid			(APIENTRY * GLPIXELTRANSFERF)(GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLPIXELTRANSFERI)(GLenum, GLint);
typedef GLvoid			(APIENTRY * GLPIXELZOOM)(GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLPOINTSIZE)(GLfloat);
typedef GLvoid			(APIENTRY * GLPOLYGONMODE)(GLenum, GLenum);
typedef GLvoid			(APIENTRY * GLPOLYGONOFFSET)(GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLPOLYGONSTIPPLE)(const GLubyte *);
typedef GLvoid			(APIENTRY * GLPOPATTRIB)(GLvoid);
typedef GLvoid			(APIENTRY * GLPOPCLIENTATTRIB)(GLvoid);
typedef GLvoid			(APIENTRY * GLPOPMATRIX)(GLvoid);
typedef GLvoid			(APIENTRY * GLPOPNAME)(GLvoid);
typedef GLvoid			(APIENTRY * GLPRIORITIZETEXTURES)(GLsizei, const GLuint *, const GLclampf *);
typedef GLvoid			(APIENTRY * GLPUSHATTRIB)(GLbitfield);
typedef GLvoid			(APIENTRY * GLPUSHCLIENTATTRIB)(GLbitfield);
typedef GLvoid			(APIENTRY * GLPUSHMATRIX)(GLvoid);
typedef GLvoid			(APIENTRY * GLPUSHNAME)(GLuint);
typedef GLvoid			(APIENTRY * GLRASTERPOS2D)(GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLRASTERPOS2DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLRASTERPOS2F)(GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLRASTERPOS2FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLRASTERPOS2I)(GLint, GLint);
typedef GLvoid			(APIENTRY * GLRASTERPOS2IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLRASTERPOS2S)(GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLRASTERPOS2SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLRASTERPOS3D)(GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLRASTERPOS3DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLRASTERPOS3F)(GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLRASTERPOS3FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLRASTERPOS3I)(GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLRASTERPOS3IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLRASTERPOS3S)(GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLRASTERPOS3SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLRASTERPOS4D)(GLdouble, GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLRASTERPOS4DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLRASTERPOS4F)(GLfloat, GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLRASTERPOS4FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLRASTERPOS4I)(GLint, GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLRASTERPOS4IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLRASTERPOS4S)(GLshort, GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLRASTERPOS4SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLREADBUFFER)(GLenum);
typedef GLvoid			(APIENTRY * GLREADPIXELS)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *);
typedef GLvoid			(APIENTRY * GLRECTD)(GLdouble, GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLRECTDV)(const GLdouble *, const GLdouble *);
typedef GLvoid			(APIENTRY * GLRECTF)(GLfloat, GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLRECTFV)(const GLfloat *, const GLfloat *);
typedef GLvoid			(APIENTRY * GLRECTI)(GLint, GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLRECTIV)(const GLint *, const GLint *);
typedef GLvoid			(APIENTRY * GLRECTS)(GLshort, GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLRECTSV)(const GLshort *, const GLshort *);
typedef GLint			(APIENTRY * GLRENDERMODE)(GLenum);
typedef GLvoid			(APIENTRY * GLROTATED)(GLdouble, GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLROTATEF)(GLfloat, GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLSCALED)(GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLSCALEF)(GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLSCISSOR)(GLint, GLint, GLsizei, GLsizei);
typedef GLvoid			(APIENTRY * GLSELECTBUFFER)(GLsizei, GLuint *);
typedef GLvoid			(APIENTRY * GLSHADEMODEL)(GLenum);
typedef GLvoid			(APIENTRY * GLSTENCILFUNC)(GLenum, GLint, GLuint);
typedef GLvoid			(APIENTRY * GLSTENCILMASK)(GLuint);
typedef GLvoid			(APIENTRY * GLSTENCILOP)(GLenum, GLenum, GLenum);
typedef GLvoid			(APIENTRY * GLTEXCOORD1D)(GLdouble);
typedef GLvoid			(APIENTRY * GLTEXCOORD1DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLTEXCOORD1F)(GLfloat);
typedef GLvoid			(APIENTRY * GLTEXCOORD1FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLTEXCOORD1I)(GLint);
typedef GLvoid			(APIENTRY * GLTEXCOORD1IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLTEXCOORD1S)(GLshort);
typedef GLvoid			(APIENTRY * GLTEXCOORD1SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLTEXCOORD2D)(GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLTEXCOORD2DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLTEXCOORD2F)(GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLTEXCOORD2FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLTEXCOORD2I)(GLint, GLint);
typedef GLvoid			(APIENTRY * GLTEXCOORD2IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLTEXCOORD2S)(GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLTEXCOORD2SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLTEXCOORD3D)(GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLTEXCOORD3DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLTEXCOORD3F)(GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLTEXCOORD3FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLTEXCOORD3I)(GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLTEXCOORD3IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLTEXCOORD3S)(GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLTEXCOORD3SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLTEXCOORD4D)(GLdouble, GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLTEXCOORD4DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLTEXCOORD4F)(GLfloat, GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLTEXCOORD4FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLTEXCOORD4I)(GLint, GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLTEXCOORD4IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLTEXCOORD4S)(GLshort, GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLTEXCOORD4SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLTEXCOORDPOINTER)(GLint, GLenum, GLsizei, const GLvoid *);
typedef GLvoid			(APIENTRY * GLTEXENVF)(GLenum, GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLTEXENVFV)(GLenum, GLenum, const GLfloat *);
typedef GLvoid			(APIENTRY * GLTEXENVI)(GLenum, GLenum, GLint);
typedef GLvoid			(APIENTRY * GLTEXENVIV)(GLenum, GLenum, const GLint *);
typedef GLvoid			(APIENTRY * GLTEXGEND)(GLenum, GLenum, GLdouble);
typedef GLvoid			(APIENTRY * GLTEXGENDV)(GLenum, GLenum, const GLdouble *);
typedef GLvoid			(APIENTRY * GLTEXGENF)(GLenum, GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLTEXGENFV)(GLenum, GLenum, const GLfloat *);
typedef GLvoid			(APIENTRY * GLTEXGENI)(GLenum, GLenum, GLint);
typedef GLvoid			(APIENTRY * GLTEXGENIV)(GLenum, GLenum, const GLint *);
typedef GLvoid			(APIENTRY * GLTEXIMAGE1D)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
typedef GLvoid			(APIENTRY * GLTEXIMAGE2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
typedef GLvoid			(APIENTRY * GLTEXPARAMETERF)(GLenum, GLenum, GLfloat);
typedef GLvoid			(APIENTRY * GLTEXPARAMETERFV)(GLenum, GLenum, const GLfloat *);
typedef GLvoid			(APIENTRY * GLTEXPARAMETERI)(GLenum, GLenum, GLint);
typedef GLvoid			(APIENTRY * GLTEXPARAMETERIV)(GLenum, GLenum, const GLint *);
typedef GLvoid			(APIENTRY * GLTEXSUBIMAGE1D)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
typedef GLvoid			(APIENTRY * GLTEXSUBIMAGE2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
typedef GLvoid			(APIENTRY * GLTRANSLATED)(GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLTRANSLATEF)(GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLVERTEX2D)(GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLVERTEX2DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLVERTEX2F)(GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLVERTEX2FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLVERTEX2I)(GLint, GLint);
typedef GLvoid			(APIENTRY * GLVERTEX2IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLVERTEX2S)(GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLVERTEX2SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLVERTEX3D)(GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLVERTEX3DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLVERTEX3F)(GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLVERTEX3FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLVERTEX3I)(GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLVERTEX3IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLVERTEX3S)(GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLVERTEX3SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLVERTEX4D)(GLdouble, GLdouble, GLdouble, GLdouble);
typedef GLvoid			(APIENTRY * GLVERTEX4DV)(const GLdouble *);
typedef GLvoid			(APIENTRY * GLVERTEX4F)(GLfloat, GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLVERTEX4FV)(const GLfloat *);
typedef GLvoid			(APIENTRY * GLVERTEX4I)(GLint, GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLVERTEX4IV)(const GLint *);
typedef GLvoid			(APIENTRY * GLVERTEX4S)(GLshort, GLshort, GLshort, GLshort);
typedef GLvoid			(APIENTRY * GLVERTEX4SV)(const GLshort *);
typedef GLvoid			(APIENTRY * GLVERTEXPOINTER)(GLint, GLenum, GLsizei, const GLvoid *);
typedef GLvoid			(APIENTRY * GLVIEWPORT)(GLint, GLint, GLsizei, GLsizei);

typedef GLvoid			(APIENTRY * GLACTIVETEXTURE)(GLenum);

typedef GLvoid			(APIENTRY * GLGENBUFFERS)(GLsizei, GLuint *);
typedef GLvoid			(APIENTRY * GLDELETEBUFFERS)(GLsizei, const GLuint *);
typedef GLvoid			(APIENTRY * GLBINDBUFFER)(GLenum, GLuint);
typedef GLvoid			(APIENTRY * GLBUFFERDATA)(GLenum, GLsizeiptr, const GLvoid *, GLenum);
typedef GLvoid			(APIENTRY * GLBUFFERSUBDATA)(GLenum, GLintptr, GLsizeiptr, const GLvoid *);
typedef GLvoid *		(APIENTRY * GLMAPBUFFER)(GLenum, GLenum);
typedef GLboolean		(APIENTRY * GLUNMAPBUFFER)(GLenum);

typedef GLuint			(APIENTRY * GLCREATESHADER)(GLenum);
typedef GLuint			(APIENTRY * GLCREATEPROGRAM)(GLvoid);
typedef GLvoid			(APIENTRY * GLDELETESHADER)(GLuint);
typedef GLvoid			(APIENTRY * GLDELETEPROGRAM)(GLuint);
typedef GLvoid			(APIENTRY * GLGETSHADERIV)(GLuint, GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLGETPROGRAMIV)(GLuint, GLenum, GLint *);
typedef GLvoid			(APIENTRY * GLGETSHADERINFOLOG)(GLuint, GLsizei, GLsizei *, GLchar *);
typedef GLvoid			(APIENTRY * GLGETPROGRAMINFOLOG)(GLuint, GLsizei, GLsizei *, GLchar *);
typedef GLvoid			(APIENTRY * GLSHADERSOURCE)(GLuint, GLsizei, const GLchar **, const GLint *);
typedef GLvoid			(APIENTRY * GLCOMPILESHADER)(GLuint);
typedef GLvoid			(APIENTRY * GLATTACHSHADER)(GLuint, GLuint);
typedef GLvoid			(APIENTRY * GLDETACHSHADER)(GLuint, GLuint);
typedef GLvoid			(APIENTRY * GLLINKPROGRAM)(GLuint);
typedef GLvoid			(APIENTRY * GLUSEPROGRAM)(GLuint);
typedef GLvoid			(APIENTRY * GLVERTEXATTRIBPOINTER)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
typedef GLvoid			(APIENTRY * GLENABLEVERTEXATTRIBARRAY)(GLuint);
typedef GLvoid			(APIENTRY * GLDISABLEVERTEXATTRIBARRAY)(GLuint);
typedef GLvoid			(APIENTRY * GLBINDATTRIBLOCATION)(GLuint, GLuint, const GLchar *);
typedef GLint			(APIENTRY * GLGETATTRIBLOCATION)(GLuint, const GLchar *);
typedef GLvoid			(APIENTRY * GLGETACTIVEUNIFORM)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
typedef GLint			(APIENTRY * GLGETUNIFORMLOCATION)(GLuint, const GLchar *);
typedef GLvoid			(APIENTRY * GLUNIFORM1F)(GLint, GLfloat);
typedef GLvoid			(APIENTRY * GLUNIFORM2F)(GLint, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLUNIFORM3F)(GLint, GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLUNIFORM4F)(GLint, GLfloat, GLfloat, GLfloat, GLfloat);
typedef GLvoid			(APIENTRY * GLUNIFORM1I)(GLint, GLint);
typedef GLvoid			(APIENTRY * GLUNIFORM2I)(GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLUNIFORM3I)(GLint, GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLUNIFORM4I)(GLint, GLint, GLint, GLint, GLint);
typedef GLvoid			(APIENTRY * GLUNIFORM1FV)(GLint, GLsizei, const GLfloat *);
typedef GLvoid			(APIENTRY * GLUNIFORM2FV)(GLint, GLsizei, const GLfloat *);
typedef GLvoid			(APIENTRY * GLUNIFORM3FV)(GLint, GLsizei, const GLfloat *);
typedef GLvoid			(APIENTRY * GLUNIFORM4FV)(GLint, GLsizei, const GLfloat *);
typedef GLvoid			(APIENTRY * GLUNIFORM1IV)(GLint, GLsizei, const GLint *);
typedef GLvoid			(APIENTRY * GLUNIFORM2IV)(GLint, GLsizei, const GLint *);
typedef GLvoid			(APIENTRY * GLUNIFORM3IV)(GLint, GLsizei, const GLint *);
typedef GLvoid			(APIENTRY * GLUNIFORM4IV)(GLint, GLsizei, const GLint *);
typedef GLvoid			(APIENTRY * GLUNIFORMMATRIX2FV)(GLint, GLsizei, GLboolean, const GLfloat *);
typedef GLvoid			(APIENTRY * GLUNIFORMMATRIX3FV)(GLint, GLsizei, GLboolean, const GLfloat *);
typedef GLvoid			(APIENTRY * GLUNIFORMMATRIX4FV)(GLint, GLsizei, GLboolean, const GLfloat *);

typedef GLvoid			(APIENTRY * GLSTENCILFUNCSEPARATE)(GLenum, GLenum, GLint, GLuint);
typedef GLvoid			(APIENTRY * GLSTENCILOPSEPARATE)(GLenum, GLenum, GLenum, GLenum);
typedef GLvoid			(APIENTRY * GLSTENCILMASKSEPARATE)(GLenum, GLuint);

typedef GLvoid			(APIENTRY * GLDEPTHBOUNDSEXT)(GLclampd, GLclampd);

// ============================================================================

extern GLvoid			(APIENTRY * qglAccum)(GLenum op, GLfloat value);
extern GLvoid			(APIENTRY * qglAlphaFunc)(GLenum func, GLclampf ref);
extern GLboolean		(APIENTRY * qglAreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences);
extern GLvoid			(APIENTRY * qglArrayElement)(GLint i);
extern GLvoid			(APIENTRY * qglBegin)(GLenum mode);
extern GLvoid			(APIENTRY * qglBindTexture)(GLenum target, GLuint texture);
extern GLvoid			(APIENTRY * qglBitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
extern GLvoid			(APIENTRY * qglBlendFunc)(GLenum sfactor, GLenum dfactor);
extern GLvoid			(APIENTRY * qglCallList)(GLuint list);
extern GLvoid			(APIENTRY * qglCallLists)(GLsizei n, GLenum type, const GLvoid *lists);
extern GLvoid			(APIENTRY * qglClear)(GLbitfield mask);
extern GLvoid			(APIENTRY * qglClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
extern GLvoid			(APIENTRY * qglClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
extern GLvoid			(APIENTRY * qglClearDepth)(GLclampd depth);
extern GLvoid			(APIENTRY * qglClearIndex)(GLfloat c);
extern GLvoid			(APIENTRY * qglClearStencil)(GLint s);
extern GLvoid			(APIENTRY * qglClipPlane)(GLenum plane, const GLdouble *equation);
extern GLvoid			(APIENTRY * qglColor3b)(GLbyte red, GLbyte green, GLbyte blue);
extern GLvoid			(APIENTRY * qglColor3bv)(const GLbyte *v);
extern GLvoid			(APIENTRY * qglColor3d)(GLdouble red, GLdouble green, GLdouble blue);
extern GLvoid			(APIENTRY * qglColor3dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglColor3f)(GLfloat red, GLfloat green, GLfloat blue);
extern GLvoid			(APIENTRY * qglColor3fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglColor3i)(GLint red, GLint green, GLint blue);
extern GLvoid			(APIENTRY * qglColor3iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglColor3s)(GLshort red, GLshort green, GLshort blue);
extern GLvoid			(APIENTRY * qglColor3sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglColor3ub)(GLubyte red, GLubyte green, GLubyte blue);
extern GLvoid			(APIENTRY * qglColor3ubv)(const GLubyte *v);
extern GLvoid			(APIENTRY * qglColor3ui)(GLuint red, GLuint green, GLuint blue);
extern GLvoid			(APIENTRY * qglColor3uiv)(const GLuint *v);
extern GLvoid			(APIENTRY * qglColor3us)(GLushort red, GLushort green, GLushort blue);
extern GLvoid			(APIENTRY * qglColor3usv)(const GLushort *v);
extern GLvoid			(APIENTRY * qglColor4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
extern GLvoid			(APIENTRY * qglColor4bv)(const GLbyte *v);
extern GLvoid			(APIENTRY * qglColor4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
extern GLvoid			(APIENTRY * qglColor4dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
extern GLvoid			(APIENTRY * qglColor4fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglColor4i)(GLint red, GLint green, GLint blue, GLint alpha);
extern GLvoid			(APIENTRY * qglColor4iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglColor4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha);
extern GLvoid			(APIENTRY * qglColor4sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
extern GLvoid			(APIENTRY * qglColor4ubv)(const GLubyte *v);
extern GLvoid			(APIENTRY * qglColor4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha);
extern GLvoid			(APIENTRY * qglColor4uiv)(const GLuint *v);
extern GLvoid			(APIENTRY * qglColor4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha);
extern GLvoid			(APIENTRY * qglColor4usv)(const GLushort *v);
extern GLvoid			(APIENTRY * qglColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
extern GLvoid			(APIENTRY * qglColorMaterial)(GLenum face, GLenum mode);
extern GLvoid			(APIENTRY * qglColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
extern GLvoid			(APIENTRY * qglCopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
extern GLvoid			(APIENTRY * qglCopyTexImage1D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
extern GLvoid			(APIENTRY * qglCopyTexImage2D)(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
extern GLvoid			(APIENTRY * qglCopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
extern GLvoid			(APIENTRY * qglCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
extern GLvoid			(APIENTRY * qglCullFace)(GLenum mode);
extern GLvoid			(APIENTRY * qglDeleteLists)(GLuint list, GLsizei range);
extern GLvoid			(APIENTRY * qglDeleteTextures)(GLsizei n, const GLuint *textures);
extern GLvoid			(APIENTRY * qglDepthFunc)(GLenum func);
extern GLvoid			(APIENTRY * qglDepthMask)(GLboolean flag);
extern GLvoid			(APIENTRY * qglDepthRange)(GLclampd zNear, GLclampd zFar);
extern GLvoid			(APIENTRY * qglDisable)(GLenum cap);
extern GLvoid			(APIENTRY * qglDisableClientState)(GLenum array);
extern GLvoid			(APIENTRY * qglDrawArrays)(GLenum mode, GLint first, GLsizei count);
extern GLvoid			(APIENTRY * qglDrawBuffer)(GLenum mode);
extern GLvoid			(APIENTRY * qglDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
extern GLvoid			(APIENTRY * qglDrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
extern GLvoid			(APIENTRY * qglEdgeFlag)(GLboolean flag);
extern GLvoid			(APIENTRY * qglEdgeFlagPointer)(GLsizei stride, const GLvoid *pointer);
extern GLvoid			(APIENTRY * qglEdgeFlagv)(const GLboolean *flag);
extern GLvoid			(APIENTRY * qglEnable)(GLenum cap);
extern GLvoid			(APIENTRY * qglEnableClientState)(GLenum array);
extern GLvoid			(APIENTRY * qglEnd)(GLvoid);
extern GLvoid			(APIENTRY * qglEndList)(GLvoid);
extern GLvoid			(APIENTRY * qglEvalCoord1d)(GLdouble u);
extern GLvoid			(APIENTRY * qglEvalCoord1dv)(const GLdouble *u);
extern GLvoid			(APIENTRY * qglEvalCoord1f)(GLfloat u);
extern GLvoid			(APIENTRY * qglEvalCoord1fv)(const GLfloat *u);
extern GLvoid			(APIENTRY * qglEvalCoord2d)(GLdouble u, GLdouble v);
extern GLvoid			(APIENTRY * qglEvalCoord2dv)(const GLdouble *u);
extern GLvoid			(APIENTRY * qglEvalCoord2f)(GLfloat u, GLfloat v);
extern GLvoid			(APIENTRY * qglEvalCoord2fv)(const GLfloat *u);
extern GLvoid			(APIENTRY * qglEvalMesh1)(GLenum mode, GLint i1, GLint i2);
extern GLvoid			(APIENTRY * qglEvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
extern GLvoid			(APIENTRY * qglEvalPoint1)(GLint i);
extern GLvoid			(APIENTRY * qglEvalPoint2)(GLint i, GLint j);
extern GLvoid			(APIENTRY * qglFeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer);
extern GLvoid			(APIENTRY * qglFinish)(GLvoid);
extern GLvoid			(APIENTRY * qglFlush)(GLvoid);
extern GLvoid			(APIENTRY * qglFogf)(GLenum pname, GLfloat param);
extern GLvoid			(APIENTRY * qglFogfv)(GLenum pname, const GLfloat *params);
extern GLvoid			(APIENTRY * qglFogi)(GLenum pname, GLint param);
extern GLvoid			(APIENTRY * qglFogiv)(GLenum pname, const GLint *params);
extern GLvoid			(APIENTRY * qglFrontFace)(GLenum mode);
extern GLvoid			(APIENTRY * qglFrustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
extern GLuint			(APIENTRY * qglGenLists)(GLsizei range);
extern GLvoid			(APIENTRY * qglGenTextures)(GLsizei n, GLuint *textures);
extern GLvoid			(APIENTRY * qglGetBooleanv)(GLenum pname, GLboolean *params);
extern GLvoid			(APIENTRY * qglGetClipPlane)(GLenum plane, GLdouble *equation);
extern GLvoid			(APIENTRY * qglGetDoublev)(GLenum pname, GLdouble *params);
extern GLenum			(APIENTRY * qglGetError)(GLvoid);
extern GLvoid			(APIENTRY * qglGetFloatv)(GLenum pname, GLfloat *params);
extern GLvoid			(APIENTRY * qglGetIntegerv)(GLenum pname, GLint *params);
extern GLvoid			(APIENTRY * qglGetLightfv)(GLenum light, GLenum pname, GLfloat *params);
extern GLvoid			(APIENTRY * qglGetLightiv)(GLenum light, GLenum pname, GLint *params);
extern GLvoid			(APIENTRY * qglGetMapdv)(GLenum target, GLenum query, GLdouble *v);
extern GLvoid			(APIENTRY * qglGetMapfv)(GLenum target, GLenum query, GLfloat *v);
extern GLvoid			(APIENTRY * qglGetMapiv)(GLenum target, GLenum query, GLint *v);
extern GLvoid			(APIENTRY * qglGetMaterialfv)(GLenum face, GLenum pname, GLfloat *params);
extern GLvoid			(APIENTRY * qglGetMaterialiv)(GLenum face, GLenum pname, GLint *params);
extern GLvoid			(APIENTRY * qglGetPixelMapfv)(GLenum map, GLfloat *values);
extern GLvoid			(APIENTRY * qglGetPixelMapuiv)(GLenum map, GLuint *values);
extern GLvoid			(APIENTRY * qglGetPixelMapusv)(GLenum map, GLushort *values);
extern GLvoid			(APIENTRY * qglGetPointerv)(GLenum pname, GLvoid **params);
extern GLvoid			(APIENTRY * qglGetPolygonStipple)(GLubyte *mask);
extern const GLubyte *	(APIENTRY * qglGetString)(GLenum name);
extern GLvoid			(APIENTRY * qglGetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params);
extern GLvoid			(APIENTRY * qglGetTexEnviv)(GLenum target, GLenum pname, GLint *params);
extern GLvoid			(APIENTRY * qglGetTexGendv)(GLenum coord, GLenum pname, GLdouble *params);
extern GLvoid			(APIENTRY * qglGetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params);
extern GLvoid			(APIENTRY * qglGetTexGeniv)(GLenum coord, GLenum pname, GLint *params);
extern GLvoid			(APIENTRY * qglGetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
extern GLvoid			(APIENTRY * qglGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params);
extern GLvoid			(APIENTRY * qglGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
extern GLvoid			(APIENTRY * qglGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params);
extern GLvoid			(APIENTRY * qglGetTexParameteriv)(GLenum target, GLenum pname, GLint *params);
extern GLvoid			(APIENTRY * qglHint)(GLenum target, GLenum mode);
extern GLvoid			(APIENTRY * qglIndexMask)(GLuint mask);
extern GLvoid			(APIENTRY * qglIndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
extern GLvoid			(APIENTRY * qglIndexd)(GLdouble c);
extern GLvoid			(APIENTRY * qglIndexdv)(const GLdouble *c);
extern GLvoid			(APIENTRY * qglIndexf)(GLfloat c);
extern GLvoid			(APIENTRY * qglIndexfv)(const GLfloat *c);
extern GLvoid			(APIENTRY * qglIndexi)(GLint c);
extern GLvoid			(APIENTRY * qglIndexiv)(const GLint *c);
extern GLvoid			(APIENTRY * qglIndexs)(GLshort c);
extern GLvoid			(APIENTRY * qglIndexsv)(const GLshort *c);
extern GLvoid			(APIENTRY * qglIndexub)(GLubyte c);
extern GLvoid			(APIENTRY * qglIndexubv)(const GLubyte *c);
extern GLvoid			(APIENTRY * qglInitNames)(GLvoid);
extern GLvoid			(APIENTRY * qglInterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer);
extern GLboolean		(APIENTRY * qglIsEnabled)(GLenum cap);
extern GLboolean		(APIENTRY * qglIsList)(GLuint list);
extern GLboolean		(APIENTRY * qglIsTexture)(GLuint texture);
extern GLvoid			(APIENTRY * qglLightModelf)(GLenum pname, GLfloat param);
extern GLvoid			(APIENTRY * qglLightModelfv)(GLenum pname, const GLfloat *params);
extern GLvoid			(APIENTRY * qglLightModeli)(GLenum pname, GLint param);
extern GLvoid			(APIENTRY * qglLightModeliv)(GLenum pname, const GLint *params);
extern GLvoid			(APIENTRY * qglLightf)(GLenum light, GLenum pname, GLfloat param);
extern GLvoid			(APIENTRY * qglLightfv)(GLenum light, GLenum pname, const GLfloat *params);
extern GLvoid			(APIENTRY * qglLighti)(GLenum light, GLenum pname, GLint param);
extern GLvoid			(APIENTRY * qglLightiv)(GLenum light, GLenum pname, const GLint *params);
extern GLvoid			(APIENTRY * qglLineStipple)(GLint factor, GLushort pattern);
extern GLvoid			(APIENTRY * qglLineWidth)(GLfloat width);
extern GLvoid			(APIENTRY * qglListBase)(GLuint base);
extern GLvoid			(APIENTRY * qglLoadIdentity)(GLvoid);
extern GLvoid			(APIENTRY * qglLoadMatrixd)(const GLdouble *m);
extern GLvoid			(APIENTRY * qglLoadMatrixf)(const GLfloat *m);
extern GLvoid			(APIENTRY * qglLoadName)(GLuint name);
extern GLvoid			(APIENTRY * qglLogicOp)(GLenum opcode);
extern GLvoid			(APIENTRY * qglMap1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
extern GLvoid			(APIENTRY * qglMap1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
extern GLvoid			(APIENTRY * qglMap2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
extern GLvoid			(APIENTRY * qglMap2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
extern GLvoid			(APIENTRY * qglMapGrid1d)(GLint un, GLdouble u1, GLdouble u2);
extern GLvoid			(APIENTRY * qglMapGrid1f)(GLint un, GLfloat u1, GLfloat u2);
extern GLvoid			(APIENTRY * qglMapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
extern GLvoid			(APIENTRY * qglMapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
extern GLvoid			(APIENTRY * qglMaterialf)(GLenum face, GLenum pname, GLfloat param);
extern GLvoid			(APIENTRY * qglMaterialfv)(GLenum face, GLenum pname, const GLfloat *params);
extern GLvoid			(APIENTRY * qglMateriali)(GLenum face, GLenum pname, GLint param);
extern GLvoid			(APIENTRY * qglMaterialiv)(GLenum face, GLenum pname, const GLint *params);
extern GLvoid			(APIENTRY * qglMatrixMode)(GLenum mode);
extern GLvoid			(APIENTRY * qglMultMatrixd)(const GLdouble *m);
extern GLvoid			(APIENTRY * qglMultMatrixf)(const GLfloat *m);
extern GLvoid			(APIENTRY * qglNewList)(GLuint list, GLenum mode);
extern GLvoid			(APIENTRY * qglNormal3b)(GLbyte nx, GLbyte ny, GLbyte nz);
extern GLvoid			(APIENTRY * qglNormal3bv)(const GLbyte *v);
extern GLvoid			(APIENTRY * qglNormal3d)(GLdouble nx, GLdouble ny, GLdouble nz);
extern GLvoid			(APIENTRY * qglNormal3dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz);
extern GLvoid			(APIENTRY * qglNormal3fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglNormal3i)(GLint nx, GLint ny, GLint nz);
extern GLvoid			(APIENTRY * qglNormal3iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglNormal3s)(GLshort nx, GLshort ny, GLshort nz);
extern GLvoid			(APIENTRY * qglNormal3sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglNormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer);
extern GLvoid			(APIENTRY * qglOrtho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
extern GLvoid			(APIENTRY * qglPassThrough)(GLfloat token);
extern GLvoid			(APIENTRY * qglPixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values);
extern GLvoid			(APIENTRY * qglPixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values);
extern GLvoid			(APIENTRY * qglPixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values);
extern GLvoid			(APIENTRY * qglPixelStoref)(GLenum pname, GLfloat param);
extern GLvoid			(APIENTRY * qglPixelStorei)(GLenum pname, GLint param);
extern GLvoid			(APIENTRY * qglPixelTransferf)(GLenum pname, GLfloat param);
extern GLvoid			(APIENTRY * qglPixelTransferi)(GLenum pname, GLint param);
extern GLvoid			(APIENTRY * qglPixelZoom)(GLfloat xfactor, GLfloat yfactor);
extern GLvoid			(APIENTRY * qglPointSize)(GLfloat size);
extern GLvoid			(APIENTRY * qglPolygonMode)(GLenum face, GLenum mode);
extern GLvoid			(APIENTRY * qglPolygonOffset)(GLfloat factor, GLfloat units);
extern GLvoid			(APIENTRY * qglPolygonStipple)(const GLubyte *mask);
extern GLvoid			(APIENTRY * qglPopAttrib)(GLvoid);
extern GLvoid			(APIENTRY * qglPopClientAttrib)(GLvoid);
extern GLvoid			(APIENTRY * qglPopMatrix)(GLvoid);
extern GLvoid			(APIENTRY * qglPopName)(GLvoid);
extern GLvoid			(APIENTRY * qglPrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities);
extern GLvoid			(APIENTRY * qglPushAttrib)(GLbitfield mask);
extern GLvoid			(APIENTRY * qglPushClientAttrib)(GLbitfield mask);
extern GLvoid			(APIENTRY * qglPushMatrix)(GLvoid);
extern GLvoid			(APIENTRY * qglPushName)(GLuint name);
extern GLvoid			(APIENTRY * qglRasterPos2d)(GLdouble x, GLdouble y);
extern GLvoid			(APIENTRY * qglRasterPos2dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglRasterPos2f)(GLfloat x, GLfloat y);
extern GLvoid			(APIENTRY * qglRasterPos2fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglRasterPos2i)(GLint x, GLint y);
extern GLvoid			(APIENTRY * qglRasterPos2iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglRasterPos2s)(GLshort x, GLshort y);
extern GLvoid			(APIENTRY * qglRasterPos2sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglRasterPos3d)(GLdouble x, GLdouble y, GLdouble z);
extern GLvoid			(APIENTRY * qglRasterPos3dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglRasterPos3f)(GLfloat x, GLfloat y, GLfloat z);
extern GLvoid			(APIENTRY * qglRasterPos3fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglRasterPos3i)(GLint x, GLint y, GLint z);
extern GLvoid			(APIENTRY * qglRasterPos3iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglRasterPos3s)(GLshort x, GLshort y, GLshort z);
extern GLvoid			(APIENTRY * qglRasterPos3sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglRasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern GLvoid			(APIENTRY * qglRasterPos4dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglRasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern GLvoid			(APIENTRY * qglRasterPos4fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglRasterPos4i)(GLint x, GLint y, GLint z, GLint w);
extern GLvoid			(APIENTRY * qglRasterPos4iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglRasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w);
extern GLvoid			(APIENTRY * qglRasterPos4sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglReadBuffer)(GLenum mode);
extern GLvoid			(APIENTRY * qglReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
extern GLvoid			(APIENTRY * qglRectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
extern GLvoid			(APIENTRY * qglRectdv)(const GLdouble *v1, const GLdouble *v2);
extern GLvoid			(APIENTRY * qglRectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
extern GLvoid			(APIENTRY * qglRectfv)(const GLfloat *v1, const GLfloat *v2);
extern GLvoid			(APIENTRY * qglRecti)(GLint x1, GLint y1, GLint x2, GLint y2);
extern GLvoid			(APIENTRY * qglRectiv)(const GLint *v1, const GLint *v2);
extern GLvoid			(APIENTRY * qglRects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
extern GLvoid			(APIENTRY * qglRectsv)(const GLshort *v1, const GLshort *v2);
extern GLint			(APIENTRY * qglRenderMode)(GLenum mode);
extern GLvoid			(APIENTRY * qglRotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
extern GLvoid			(APIENTRY * qglRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
extern GLvoid			(APIENTRY * qglScaled)(GLdouble x, GLdouble y, GLdouble z);
extern GLvoid			(APIENTRY * qglScalef)(GLfloat x, GLfloat y, GLfloat z);
extern GLvoid			(APIENTRY * qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
extern GLvoid			(APIENTRY * qglSelectBuffer)(GLsizei size, GLuint *buffer);
extern GLvoid			(APIENTRY * qglShadeModel)(GLenum mode);
extern GLvoid			(APIENTRY * qglStencilFunc)(GLenum func, GLint ref, GLuint mask);
extern GLvoid			(APIENTRY * qglStencilMask)(GLuint mask);
extern GLvoid			(APIENTRY * qglStencilOp)(GLenum fail, GLenum zfail, GLenum zpass);
extern GLvoid			(APIENTRY * qglTexCoord1d)(GLdouble s);
extern GLvoid			(APIENTRY * qglTexCoord1dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglTexCoord1f)(GLfloat s);
extern GLvoid			(APIENTRY * qglTexCoord1fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglTexCoord1i)(GLint s);
extern GLvoid			(APIENTRY * qglTexCoord1iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglTexCoord1s)(GLshort s);
extern GLvoid			(APIENTRY * qglTexCoord1sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglTexCoord2d)(GLdouble s, GLdouble t);
extern GLvoid			(APIENTRY * qglTexCoord2dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglTexCoord2f)(GLfloat s, GLfloat t);
extern GLvoid			(APIENTRY * qglTexCoord2fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglTexCoord2i)(GLint s, GLint t);
extern GLvoid			(APIENTRY * qglTexCoord2iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglTexCoord2s)(GLshort s, GLshort t);
extern GLvoid			(APIENTRY * qglTexCoord2sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglTexCoord3d)(GLdouble s, GLdouble t, GLdouble r);
extern GLvoid			(APIENTRY * qglTexCoord3dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglTexCoord3f)(GLfloat s, GLfloat t, GLfloat r);
extern GLvoid			(APIENTRY * qglTexCoord3fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglTexCoord3i)(GLint s, GLint t, GLint r);
extern GLvoid			(APIENTRY * qglTexCoord3iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglTexCoord3s)(GLshort s, GLshort t, GLshort r);
extern GLvoid			(APIENTRY * qglTexCoord3sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglTexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
extern GLvoid			(APIENTRY * qglTexCoord4dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglTexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
extern GLvoid			(APIENTRY * qglTexCoord4fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglTexCoord4i)(GLint s, GLint t, GLint r, GLint q);
extern GLvoid			(APIENTRY * qglTexCoord4iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglTexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q);
extern GLvoid			(APIENTRY * qglTexCoord4sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
extern GLvoid			(APIENTRY * qglTexEnvf)(GLenum target, GLenum pname, GLfloat param);
extern GLvoid			(APIENTRY * qglTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params);
extern GLvoid			(APIENTRY * qglTexEnvi)(GLenum target, GLenum pname, GLint param);
extern GLvoid			(APIENTRY * qglTexEnviv)(GLenum target, GLenum pname, const GLint *params);
extern GLvoid			(APIENTRY * qglTexGend)(GLenum coord, GLenum pname, GLdouble param);
extern GLvoid			(APIENTRY * qglTexGendv)(GLenum coord, GLenum pname, const GLdouble *params);
extern GLvoid			(APIENTRY * qglTexGenf)(GLenum coord, GLenum pname, GLfloat param);
extern GLvoid			(APIENTRY * qglTexGenfv)(GLenum coord, GLenum pname, const GLfloat *params);
extern GLvoid			(APIENTRY * qglTexGeni)(GLenum coord, GLenum pname, GLint param);
extern GLvoid			(APIENTRY * qglTexGeniv)(GLenum coord, GLenum pname, const GLint *params);
extern GLvoid			(APIENTRY * qglTexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
extern GLvoid			(APIENTRY * qglTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
extern GLvoid			(APIENTRY * qglTexParameterf)(GLenum target, GLenum pname, GLfloat param);
extern GLvoid			(APIENTRY * qglTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params);
extern GLvoid			(APIENTRY * qglTexParameteri)(GLenum target, GLenum pname, GLint param);
extern GLvoid			(APIENTRY * qglTexParameteriv)(GLenum target, GLenum pname, const GLint *params);
extern GLvoid			(APIENTRY * qglTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
extern GLvoid			(APIENTRY * qglTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
extern GLvoid			(APIENTRY * qglTranslated)(GLdouble x, GLdouble y, GLdouble z);
extern GLvoid			(APIENTRY * qglTranslatef)(GLfloat x, GLfloat y, GLfloat z);
extern GLvoid			(APIENTRY * qglVertex2d)(GLdouble x, GLdouble y);
extern GLvoid			(APIENTRY * qglVertex2dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglVertex2f)(GLfloat x, GLfloat y);
extern GLvoid			(APIENTRY * qglVertex2fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglVertex2i)(GLint x, GLint y);
extern GLvoid			(APIENTRY * qglVertex2iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglVertex2s)(GLshort x, GLshort y);
extern GLvoid			(APIENTRY * qglVertex2sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglVertex3d)(GLdouble x, GLdouble y, GLdouble z);
extern GLvoid			(APIENTRY * qglVertex3dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglVertex3f)(GLfloat x, GLfloat y, GLfloat z);
extern GLvoid			(APIENTRY * qglVertex3fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglVertex3i)(GLint x, GLint y, GLint z);
extern GLvoid			(APIENTRY * qglVertex3iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglVertex3s)(GLshort x, GLshort y, GLshort z);
extern GLvoid			(APIENTRY * qglVertex3sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglVertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
extern GLvoid			(APIENTRY * qglVertex4dv)(const GLdouble *v);
extern GLvoid			(APIENTRY * qglVertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
extern GLvoid			(APIENTRY * qglVertex4fv)(const GLfloat *v);
extern GLvoid			(APIENTRY * qglVertex4i)(GLint x, GLint y, GLint z, GLint w);
extern GLvoid			(APIENTRY * qglVertex4iv)(const GLint *v);
extern GLvoid			(APIENTRY * qglVertex4s)(GLshort x, GLshort y, GLshort z, GLshort w);
extern GLvoid			(APIENTRY * qglVertex4sv)(const GLshort *v);
extern GLvoid			(APIENTRY * qglVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
extern GLvoid			(APIENTRY * qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height);

extern GLvoid			(APIENTRY * qglActiveTexture)(GLenum texture);

extern GLvoid			(APIENTRY * qglGenBuffers)(GLsizei n, GLuint *buffers);
extern GLvoid			(APIENTRY * qglDeleteBuffers)(GLsizei n, const GLuint *buffers);
extern GLvoid			(APIENTRY * qglBindBuffer)(GLenum target, GLuint buffer);
extern GLvoid			(APIENTRY * qglBufferData)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
extern GLvoid			(APIENTRY * qglBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
extern GLvoid *			(APIENTRY * qglMapBuffer)(GLenum target, GLenum access);
extern GLboolean		(APIENTRY * qglUnmapBuffer)(GLenum target);

extern GLuint			(APIENTRY * qglCreateShader)(GLenum type);
extern GLuint			(APIENTRY * qglCreateProgram)(GLvoid);
extern GLvoid			(APIENTRY * qglDeleteShader)(GLuint shader);
extern GLvoid			(APIENTRY * qglDeleteProgram)(GLuint program);
extern GLvoid			(APIENTRY * qglGetShaderiv)(GLuint shader, GLenum pname, GLint *params);
extern GLvoid			(APIENTRY * qglGetProgramiv)(GLuint program, GLenum pname, GLint *params);
extern GLvoid			(APIENTRY * qglGetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
extern GLvoid			(APIENTRY * qglGetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
extern GLvoid			(APIENTRY * qglShaderSource)(GLuint shader, GLsizei count, const GLchar **string, const GLint *length);
extern GLvoid			(APIENTRY * qglCompileShader)(GLuint shader);
extern GLvoid			(APIENTRY * qglAttachShader)(GLuint program, GLuint shader);
extern GLvoid			(APIENTRY * qglDetachShader)(GLuint program, GLuint shader);
extern GLvoid			(APIENTRY * qglLinkProgram)(GLuint program);
extern GLvoid			(APIENTRY * qglUseProgram)(GLuint program);
extern GLvoid			(APIENTRY * qglVertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
extern GLvoid			(APIENTRY * qglEnableVertexAttribArray)(GLuint index);
extern GLvoid			(APIENTRY * qglDisableVertexAttribArray)(GLuint index);
extern GLvoid			(APIENTRY * qglBindAttribLocation)(GLuint program, GLuint index, const GLchar *name);
extern GLint			(APIENTRY * qglGetAttribLocation)(GLuint program, const GLchar *name);
extern GLvoid			(APIENTRY * qglGetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
extern GLint			(APIENTRY * qglGetUniformLocation)(GLuint program, const GLchar *name);
extern GLvoid			(APIENTRY * qglUniform1f)(GLint location, GLfloat v0);
extern GLvoid			(APIENTRY * qglUniform2f)(GLint location, GLfloat v0, GLfloat v1);
extern GLvoid			(APIENTRY * qglUniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
extern GLvoid			(APIENTRY * qglUniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
extern GLvoid			(APIENTRY * qglUniform1i)(GLint location, GLint v0);
extern GLvoid			(APIENTRY * qglUniform2i)(GLint location, GLint v0, GLint v1);
extern GLvoid			(APIENTRY * qglUniform3i)(GLint location, GLint v0, GLint v1, GLint v2);
extern GLvoid			(APIENTRY * qglUniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
extern GLvoid			(APIENTRY * qglUniform1fv)(GLint location, GLsizei count, const GLfloat *value);
extern GLvoid			(APIENTRY * qglUniform2fv)(GLint location, GLsizei count, const GLfloat *value);
extern GLvoid			(APIENTRY * qglUniform3fv)(GLint location, GLsizei count, const GLfloat *value);
extern GLvoid			(APIENTRY * qglUniform4fv)(GLint location, GLsizei count, const GLfloat *value);
extern GLvoid			(APIENTRY * qglUniform1iv)(GLint location, GLsizei count, const GLint *value);
extern GLvoid			(APIENTRY * qglUniform2iv)(GLint location, GLsizei count, const GLint *value);
extern GLvoid			(APIENTRY * qglUniform3iv)(GLint location, GLsizei count, const GLint *value);
extern GLvoid			(APIENTRY * qglUniform4iv)(GLint location, GLsizei count, const GLint *value);
extern GLvoid			(APIENTRY * qglUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
extern GLvoid			(APIENTRY * qglUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
extern GLvoid			(APIENTRY * qglUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);

extern GLvoid			(APIENTRY * qglStencilFuncSeparate)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
extern GLvoid			(APIENTRY * qglStencilOpSeparate)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
extern GLvoid			(APIENTRY * qglStencilMaskSeparate)(GLenum face, GLuint mask);

extern GLvoid			(APIENTRY * qglDepthBoundsEXT)(GLclampd zmin, GLclampd zmax);

// ============================================================================

void		QGL_EnableLogging (bool enable);
void		QGL_LogPrintf (const char *fmt, ...);

bool		QGL_Init (const char *driver);
void		QGL_Shutdown (void);


#endif	// __QGL_H__
